package net.lainiao.morethread.Chapter2.demo1;

/**
 * Created by Administrator on 2017/2/28.
 */
public class Bank implements Runnable {
    private Account account;

    public Bank(Account account) {
        this.account = account;
    }

    @Override
    public void run() {
        for (int i=0;i<100;i++){
            account.substractAmount(1000);
        }
    }
}
